package com.alveole.events;

import java.util.ArrayList;
import java.util.List;

public class BrowserInitEvent extends BrowserEvent {

	@Override
	public List<ServerEvent> getAnswers_() {
		List <ServerEvent> events = new ArrayList<ServerEvent>();
		if (eventBean.getBrowserSession().isAuthenticated())
		{
			events.add(new setValueEvent("ALVEOLEauthenticated",true));
			events.add(new setValueEvent("ALVEOLElogin",eventBean.getBrowserSession().getUser().getLogin()));
		}	
		else
		{
			events.add(new setValueEvent("ALVEOLE.authenticated",false));
		}

		return events;
	}

}
